package com.web.controller;

import com.core.vo.ResultVo;
import com.web.service.IndexServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


@RequestMapping(value = "/index")
@Controller
public class IndexController {

    @Autowired
    private IndexServices indexServices;

    @PostMapping(value = "/index",name = "首页")
    @ResponseBody
    public String index(@RequestBody MultipartFile multipartFile){

        return "index";
    }

    @GetMapping(value = "/index1",name = "测试用接口")
    public String testIndex(Model model) {
        ResultVo resultVo = new ResultVo();
        resultVo.setResultCode("33");
        model.addAttribute("title","修改标题");
        return "index";
    }



}
